-- GENERATED SPELL FOR [Ancient Core Hound] --


function spell0_11673(pUnit, Event) --@Ancient Despair,Self--
pUnit:FullCastSpellOnTarget(19369,pUnit)
pUnit:RegisterEvent('Sorts_11673', 5300, 1)
end

function spell1_11673(pUnit, Event) --@Ancient Dread,Self--
pUnit:FullCastSpellOnTarget(19365,pUnit)
pUnit:RegisterEvent('Sorts_11673', 644, 1)
end

function spell2_11673(pUnit, Event) --@Ancient Hysteria,Self--
pUnit:FullCastSpellOnTarget(19372,pUnit)
pUnit:RegisterEvent('Sorts_11673', 575, 1)
end

function spell3_11673(pUnit, Event) --@Cauterizing Flames,Self--
pUnit:FullCastSpellOnTarget(19366,pUnit)
pUnit:RegisterEvent('Sorts_11673', 563, 1)
end

function spell4_11673(pUnit, Event) --@Ground Stomp,Self--
pUnit:FullCastSpellOnTarget(19364,pUnit)
pUnit:RegisterEvent('Sorts_11673', 5305, 1)
end

function spell5_11673(pUnit, Event) --@Lava Breath,Self--
pUnit:FullCastSpellOnTarget(19272,pUnit)
pUnit:RegisterEvent('Sorts_11673', 644, 1)
end

function spell6_11673(pUnit, Event) --@Vicious Bite,n/a--
pUnit:FullCastSpellOnTarget(19319,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_11673', 686, 1)
end

function spell7_11673(pUnit, Event) --@Withering Heat,Self--
pUnit:FullCastSpellOnTarget(19367,pUnit)
pUnit:RegisterEvent('Sorts_11673', 525, 1)
end

function Sorts_11673(pUnit, Event)
local choix_sorts_11673 = math.random(0, 7)
if choix_sorts_11673 == 0 then
pUnit:RegisterEvent('spell0_11673', 1, 1)
end
if choix_sorts_11673 == 1 then
pUnit:RegisterEvent('spell1_11673', 1, 1)
end
if choix_sorts_11673 == 2 then
pUnit:RegisterEvent('spell2_11673', 1, 1)
end
if choix_sorts_11673 == 3 then
pUnit:RegisterEvent('spell3_11673', 1, 1)
end
if choix_sorts_11673 == 4 then
pUnit:RegisterEvent('spell4_11673', 1, 1)
end
if choix_sorts_11673 == 5 then
pUnit:RegisterEvent('spell5_11673', 1, 1)
end
if choix_sorts_11673 == 6 then
pUnit:RegisterEvent('spell6_11673', 1, 1)
end
if choix_sorts_11673 == 7 then
pUnit:RegisterEvent('spell7_11673', 1, 1)
end
end

function mob11673_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_11673', math.random(1500, 3000), 1)
end

function mob11673_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11673_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob11673_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(11673, 1, 'mob11673_Action')
RegisterUnitEvent(11673, 2, 'mob11673_Leave')
RegisterUnitEvent(11673, 3, 'mob11673_Kill')
RegisterUnitEvent(11673, 4, 'mob11673_Die')
